
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS OFF
GO

/*
----------------------------------------------------------------------------------------------------

-- Created By:  ()
-- Purpose: Inserts a record into the File table
----------------------------------------------------------------------------------------------------
*/


CREATE PROCEDURE dbo.File_Insert
(

	@Id int    OUTPUT,

	@Url nvarchar (200)  ,

	@Title nvarchar (50)  ,

	@ParentId nvarchar (20)  ,

	@OrderIndex int   ,

	@IsPublished bit   ,

	@FileType varchar (10)  ,

	@CreatedDate datetime   ,

	@UpdatedDate datetime   ,

	@CreatedUser varchar (50)  ,

	@UpdatedUser varchar (50)  
)
AS


				
				INSERT INTO [dbo].[File]
					(
					[Url]
					,[Title]
					,[ParentId]
					,[OrderIndex]
					,[IsPublished]
					,[FileType]
					,[CreatedDate]
					,[UpdatedDate]
					,[CreatedUser]
					,[UpdatedUser]
					)
				VALUES
					(
					@Url
					,@Title
					,@ParentId
					,@OrderIndex
					,@IsPublished
					,@FileType
					,@CreatedDate
					,@UpdatedDate
					,@CreatedUser
					,@UpdatedUser
					)
				
				-- Get the identity value
				SET @Id = SCOPE_IDENTITY()
									
							
			

GO
